package com.caidan.comsumer.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @项目名 rabbit-mq-learning
 * @描述 配置类
 * @作者 wzy
 * @时间 2024/5/19 10:12
 */
@Configuration
public class FanoutConfiguration {
//
//    @Bean
//    public FanoutExchange fanoutExchange(){
////        这个内容还是很不错的
////        Exchange build = ExchangeBuilder
////                          .fanoutExchange("hmall.fanout2")
////                          .build();
//        return new FanoutExchange("hmall.fanout2");
//    }
//
//    @Bean
//    public Queue fanoutQueue3(){
////         持久化队列
////        QueueBuilder.durable("ff");
////        默认就是持久的
//        return new Queue("fanout.queue3");
//    }
//    @Bean
//    public Binding fanoutBindinge3(Queue fanoutQueue3,FanoutExchange fanoutExchange){
//        return BindingBuilder.bind(fanoutQueue3).to(fanoutExchange);
//    }

//
//
//    @Bean
//    public FanoutExchange fanoutExchange2(){
//        return new FanoutExchange("hmall.fanout3");
//    }
//
//    @Bean
//    public Queue fanoutQueue2(){
//        return new Queue("fanout.queue4");
//    }
//    @Bean
//    public Binding fanoutBindinge4(){
//        return BindingBuilder.bind(fanoutQueue2()).to(fanoutExchange2());
//    }


}
